<%--
  Created by IntelliJ IDEA.
  User: Smile
  Date: 2019/2/28
  Time: 10:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>知识学院</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="resources/css/mobile-css/home.css" />
    <!-- Le styles -->
    <link href="resources/css/mobile-css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
    </style>
    <link href="resources/css/mobile-css/bootstrap-responsive.css" rel="stylesheet">
    <link rel="shortcut icon" href="<%=basePath%>resources/images/favicon.ico"/>
</head>
<body>
<jsp:include page="mobile-header.jsp"/>
    <div class="full-slider">
        <!-- Slider (Flex Slider) -->

        <div class="container">
            ${errorMsg }
            <a href="student/mobile/mobile-practice-list" class="btn btn-success btn-sm join-practice-btn">返回</a>
        </div>
    </div>

    <hr>

    <jsp:include page="footer.jsp"/>
    <script type="text/javascript"
            src="resources/js/jquery/jquery-1.9.0.min.js"></script>
    <!-- Bootstrap JS -->
    <script type="text/javascript"
            src="resources/bootstrap/js/bootstrap.min.js"></script>
    <script>
        $(function(){
            bindQuestionKnowledage();
            var result = checkBrowser();
            if (!result){
                alert("请至少更新浏览器版本至IE8或以上版本");
            }
        });

        function checkBrowser() {
            var browser = navigator.appName;
            var b_version = navigator.appVersion;
            var version = b_version.split(";");
            var trim_Version = version[1].replace(/[ ]/g, "");
            if (browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") {
                return false;
            } else if (browser == "Microsoft Internet Explorer"
                && trim_Version == "MSIE6.0") {
                return false;
            } else
                return true;
        }

        function bindQuestionKnowledage(){
            $(".knowledge-title").click(function(){
                var ul = $(this).parent().find(".question-list-knowledge");

                if(ul.is(":visible")){
                    $(this).find(".fa-chevron-down").hide();
                    $(this).find(".fa-chevron-up").show();

                    $(".question-list-knowledge").slideUp();

                }else{
                    $(".fa-chevron-down").hide();
                    $(".fa-chevron-up").show();

                    $(this).find(".fa-chevron-up").hide();
                    $(this).find(".fa-chevron-down").show();

                    $(".question-list-knowledge").slideUp();
                    ul.slideDown();

                }


            });
        }
    </script>
</body>
</html>
